<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of CustomService
 *
 * @author Administrator
 */
class CustomService {

    function create() {
        return D('custom')->create();
    }

    function insert($custom) {
        return D('custom')->add($custom);
    }

    function update($custom) {
        return D('custom')->save($custom);
    }

    function delete($id) {
        return D('custom')->where(array('id' => $id))->delete();
    }

    function count() {
        return D('custom')->count();
    }

    function listCustom($limit) {
        return D('custom')->limit($limit)->select();
    }

    function findCustomById($id) {
        $where['id'] = array('eq', $id);
        return D('custom')->where($where)->find();
    }

}

?>
